package com.kmzx.one.project.mapper;

import com.kmzx.one.project.entity.ChannelActivity;
import com.kmzx.one.project.entity.ChannelBrowsing;
import com.kmzx.one.project.entity.ChannelBuying;
import com.kmzx.one.project.entity.ChannelProduct;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface ExpandUserMapper {

    void insertChannelActivity(ChannelActivity channelActivity);

    ChannelActivity selectChannelActivityById(String id);

    void updateChannelActivity2(ChannelActivity channelActivity);

    void insertChannelBrowsing(ChannelBrowsing channelBrowsing);

    List<Map<String,Integer>> selectProductNumberGroupByOrderId(@Param("orderIed") String orderIed);

    List<ChannelProduct> selectChannelProduct(@Param("channelId") String channelId);

    void updateChannelActivity(@Param("buyBrowsingNum") Integer buyBrowsingNum, @Param("buyOtherNum") Integer buyOtherNum, @Param("channelId") String channelId);

    void batchInsertChannelBuying(@Param("list") List<ChannelBuying> list);

    int countUserBrowsing(@Param("unionId") String unionId);

    Date checkUserBrowsingMonth(@Param("unionId") String unionId);
}
